import * as types from '../../mutation-types/keyword/index.js';

const state = {
    keyword_get_list : [],
    currentPage :1,
    totalCount : 0,
    pageSize: 50,
    currentPageDetail :1,
    totalCountDetail : 0,
    pageSizeDetail: 50,
    value: '',
    keyword: '',
    id: '',
    valueUrl: '',
    keywordUrl: '',
    idUrl: '',
};

const mutations = {
	[types.KEYWORD_GET_LIST] (state , {keyword_get_list}){
		state.keyword_get_list = keyword_get_list;
	},
    [types.KEYWORD_CURRENTPAGE] (state , {currentPage}){
        state.currentPage = currentPage;
    },
    [types.KEYWORD_PAGESIZE] (state , {pageSize}){
        state.pageSize = pageSize;
    },
    [types.KEYWORD_TOTALCOUNT] (state , {totalCount}){
        state.totalCount = totalCount;
    },
    [types.KEYWORD_DETAIL_CURRENTPAGE] (state , {currentPageDetail}){
        state.currentPageDetail = currentPageDetail;
    },
    [types.KEYWORD_DETAIL_PAGESIZE] (state , {pageSizeDetail}){
        state.pageSizeDetail = pageSizeDetail;
    },
    [types.KEYWORD_DETAIL_TOTALCOUNT] (state , {totalCountDetail}){
        state.totalCountDetail = totalCountDetail;
    },
    [types.KEYWORD_SEARCH_VALUE] (state , {value}){
        state.value = value;
    },
    [types.KEYWORD_SEARCH_KEYWORD] (state , {keyword}){
        state.keyword = keyword;
    },
    [types.KEYWORD_SEARCH_ID] (state , {id}){
        state.id = id;
    },
};

export default {
	state ,
	mutations
};
